package com.sg.service.biz.app.nb;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.dto.biz.app.req.*;
import com.sg.dto.biz.app.res.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

/**
 * @author ： 手工接入方法
 * @version 1.0
 * @since 2022/5/28 15:32
 */
@Service
public class NbQuestion {
    /**
     * code:receptionService
     * name:M3接收出参数据集结果
     * desc:undefined
     * gen by moon at 11/8/2023, 3:53:59 PM
     **/
    @Trace(operationName = "M3接收出参数据集结果")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementTypeCodeFieldsAcceptRespDto implementTypeCodeFieldsAccept(ImplementTypeCodeFieldsAcceptReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementTypeCodeFieldsAcceptRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3约定消息层级为1-5
     * desc:undefined
     * gen by moon at 11/28/2023, 3:50:44 PM
     **/
    @Trace(operationName = "M3约定消息层级为1-5")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementGainInParameterFieldsRespDto implementGainInParameterFields(ImplementGainInParameterFieldsReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementGainInParameterFieldsRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3-约定：系统当前时间
     * desc:undefined
     * gen by moon at 11/30/2023, 8:30:06 PM
     **/
    @Trace(operationName = "M3-约定：系统当前时间")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementAcceptFieldRespDto implementAcceptField(ImplementAcceptFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementAcceptFieldRespDto.class);
    }

    /**
     * code:obtainPageTotals
     * name:M3-执行获取分页总条数（特殊方法）
     * desc:undefined
     * gen by moon at 12/8/2023, 11:21:46 AM
     **/
    @Trace(operationName = "M3-执行获取分页总条数（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementObtainPageTotalsRespDto implementObtainPageTotals(ImplementObtainPageTotalsReqDto reqDto) {
        ImplementObtainPageTotalsRespDto retData = new ImplementObtainPageTotalsRespDto();
        retData.setTotals(0L);
        Page<?> page = CommonFunctionHelper.getBaseInfoFromLocal().getPageInfo();
        if (page != null) {
            retData.setTotals(page.getTotal());
        }
        return retData;
    }

    /**
     * code:receptionService
     * name:M3约定发送消息业务场景
     * desc:undefined
     * gen by moon at 1/1/2024, 9:14:53 PM
     **/
    @Trace(operationName = "M3约定发送消息业务场景")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementAcceptFieldUseWorkTaskRespDto implementAcceptFieldUseWorkTask(ImplementAcceptFieldUseWorkTaskReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementAcceptFieldUseWorkTaskRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3-约定：问题状态
     * desc:undefined
     * gen by moon at 1/3/2024, 5:01:27 AM
     **/
    @Trace(operationName = "M3-约定：问题状态")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementFourthReceivingFieldRespDto implementFourthReceivingField(ImplementFourthReceivingFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementFourthReceivingFieldRespDto.class);
    }
    //手工接入方法
}
